package com.wlh.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wlh.common.PageVo;
import com.wlh.entity.ProjectMessage;
import com.wlh.mapper.ProjectMessageMapper;
import com.wlh.service.ProjectMessageService;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author Mr.Wei
 * @since 2023-12-22
 */
@Service
public class ProjectMessageServiceImpl extends ServiceImpl<ProjectMessageMapper, ProjectMessage>
		implements ProjectMessageService {

	@Autowired
	ProjectMessageMapper projectMessageMapper;

	@Override
	public IPage<ProjectMessage> search(PageVo vo, String projectNo) {
		Page<ProjectMessage> page = new Page<ProjectMessage>(vo.getPage(), vo.getLimit());
		IPage<ProjectMessage> search = projectMessageMapper.search(page, projectNo);
		return search;
	}

	@Override
	public List<ProjectMessage> searchByProjectNo(String projectNo, String status) {
		return projectMessageMapper.searchByProjectNo(projectNo, status);
	}

}
